import request from '@/utils/request';
import qs from 'qs';

// 查询医生助理分页
export function query(params) {
  return request({
    url: process.env.VUE_APP_AID_API + '/doctor/doctorAssistant/queryPage',
    method: 'get',
    params
  });
}
// 新增医生助理
export function add(data) {
  return request({
    url: process.env.VUE_APP_AID_API + '/doctor/doctorAssistant/create',
    method: 'post',
    data
  });
}
// 编辑
export function edit(data) {
  return request({
    url: process.env.VUE_APP_AID_API + '/doctor/doctorAssistant/update',
    method: 'post',
    data
  });
}
// 删除医生助理
export function del(data) {
  return request({
    url: process.env.VUE_APP_AID_API + '/doctor/doctorAssistant/delete',
    method: 'post',
    data
  });
}
// 导出数据
export function download(params) {
  return request({
    url: process.env.VUE_APP_AID_API + '/doctor/doctorAssistant/download' + '?' + qs.stringify(params, { indices: false }),
    method: 'get',
    responseType: 'blob'
  });
}
// 通过中台id查询医生
export function queryDoctorInfo(params) {
  return request({
    url: process.env.VUE_APP_AID_API + '/doctor/centerUser/' + params,
    method: 'get'
  });
}
// 根据诊所id获取当前诊所
export function queryClinic(params) {
  return request({
    url: process.env.VUE_APP_SALEAREA_API + '/org/clinic/id/' + params,
    method: 'get'
  });
}
// 助理重置密码
export function resetPassword(data) {
  return request({
    url: process.env.VUE_APP_AID_API + '/doctor/doctorAssistant/resetPwd',
    method: 'post',
    data
  });
}
